ALL :=

sources := 

#all
all: $(ALL)
.PHONY: all

# .d generation
%.d: %.c
	@set -e; rm -f $@; \
	gcc -MM $< > $@.$$$$; \
	se 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
	rm -f $@.$$$$

# include all the .d files
include $(sources:.c=.d)

#clean action
.PHONY: clean cleanOut cleanObj cleanDep
clean: cleanDep cleanObj cleanOut

cleanDep:
	-rm *.d

cleanObj:
	-rm *.o

cleanOut:
	-rm *.out

